from django.urls import path,re_path
from . import views
from django.conf.urls import url, include
from rest_framework import routers
from login import views as login_views
from articles.views import Articles as Articles_views
# 使用自动URL路由连接我们的API。
router = routers.DefaultRouter()

urlpatterns = [
    path(r'', include(router.urls)),
    path(r'api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    path(r'login/', login_views.Login.as_view()),
    path(r'register/', login_views.Register.as_view()),
    path(r'logout/', login_views.LogOut.as_view()),
    path(r'articles/',Articles_views.as_view()),
    path(r'forget/',login_views.Forget.as_view()),
]
